<?php

namespace app\common\model\ads;

use think\Model;

/**
 * 红包金币表
 */
class GoldLog extends Model
{

    // 表名
    protected $name = 'self_gold_log';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;
   

    public function getStatusList()
    {
        return ['0' => "待领取", '1' => "已领取", "2" => "已退回"];
    }

    public function getStatusTextAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
        $list = $this->getStatusList();
        return isset($list[$value]) ? $list[$value] : '';
    }


    /**
     * 
     */

}
